/**
 * Created by cxl on 2017/2/23.
 */
// window.onload = function () {
//     var more = document.getElementById('more');
//     console.log(more);
//     more.onclick = function () {
//         var shownine = document.getElementById("shownine"),
//             showten = document.getElementById("showten"),
//             showeleven = document.getElementById("showeleven"),
//             showtwelve = document.getElementById("showtwelve");
//         shownine.style.display = "block";
//         showten.style.display = "block";
//         showeleven.style.display = "block";
//         showtwelve.style.display = "block";
//     }
//     $.ajax()
// }


window.onload = function () {
    $.ajax({
        type: 'get',
        url: 'http://192.168.23.81:3000/api/getindexmenu?',
        dataType: 'json',
        success: function (data) {
            console.log(data);
            var html = template("template", data);
            $('.suo').html(html);
        }
    });
    $.ajax({
        type: 'get',
        url: 'http://192.168.23.81:3000/api/getmoneyctrl',
        dataType: 'json',
        success: function (data) {
            var html = template("templat", data);
            $('.contt').html(html);
            console.log(data.result[0].productImg2);
        }
    });
    $(".suo").on("click", "div:nth-child(8)", function () {
        $(".suo div:nth-last-child(-n+4)").toggleClass("show")
    });
};
